Optimal. Leaf size=112 \[ -\frac{2 \left (a e^2+c d^2\right )}{e^2 \sqrt{d+e x} (e f-d g)}-\frac{2 \left (a g^2+c f^2\right ) \tan ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}}+\frac{2 c \sqrt{d+e x}}{e^2 g} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.215486, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {898, 1261, 205} \[ -\frac{2 \left (a e^2+c d^2\right )}{e^2 \sqrt{d+e x} (e f-d g)}-\frac{2 \left (a g^2+c f^2\right ) \tan ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}}+\frac{2 c \sqrt{d+e x}}{e^2 g} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 898
Rule 1261
Rule 205
Rubi steps
\begin{align*} \int \frac{a+c x^2}{(d+e x)^{3/2} (f+g x)} \, dx &=\frac{2 \operatorname{Subst}\left (\int \frac{\frac{c d^2+a e^2}{e^2}-\frac{2 c d x^2}{e^2}+\frac{c x^4}{e^2}}{x^2 \left (\frac{e f-d g}{e}+\frac{g x^2}{e}\right )} \, dx,x,\sqrt{d+e x}\right )}{e}\\ &=\frac{2 \operatorname{Subst}\left (\int \left (\frac{c}{e g}+\frac{c d^2+a e^2}{e (e f-d g) x^2}-\frac{e \left (c f^2+a g^2\right )}{g (-e f+d g) \left (-e f+d g-g x^2\right )}\right ) \, dx,x,\sqrt{d+e x}\right )}{e}\\ &=-\frac{2 \left (c d^2+a e^2\right )}{e^2 (e f-d g) \sqrt{d+e x}}+\frac{2 c \sqrt{d+e x}}{e^2 g}+\frac{\left (2 \left (c f^2+a g^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-e f+d g-g x^2} \, dx,x,\sqrt{d+e x}\right )}{g (e f-d g)}\\ &=-\frac{2 \left (c d^2+a e^2\right )}{e^2 (e f-d g) \sqrt{d+e x}}+\frac{2 c \sqrt{d+e x}}{e^2 g}-\frac{2 \left (c f^2+a g^2\right ) \tan ^{-1}\left (\frac{\sqrt{g} \sqrt{d+e x}}{\sqrt{e f-d g}}\right )}{g^{3/2} (e f-d g)^{3/2}}\\ \end{align*}
Mathematica [C] time = 0.0936026, size = 91, normalized size = 0.81 \[ \frac{2 c (e f-d g) (2 d g+e (f+g x))-2 e^2 \left (a g^2+c f^2\right ) \, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};\frac{g (d+e x)}{d g-e f}\right )}{e^2 g^2 \sqrt{d+e x} (e f-d g)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.239, size = 114, normalized size = 1. \begin{align*} 2\,{\frac{1}{{e}^{2}} \left ({\frac{c\sqrt{ex+d}}{g}}-{\frac{{e}^{2} \left ( a{g}^{2}+c{f}^{2} \right ) }{ \left ( dg-ef \right ) g\sqrt{ \left ( dg-ef \right ) g}}{\it Artanh} \left ({\frac{\sqrt{ex+d}g}{\sqrt{ \left ( dg-ef \right ) g}}} \right ) }-{\frac{-a{e}^{2}-c{d}^{2}}{ \left ( dg-ef \right ) \sqrt{ex+d}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.89517, size = 1030, normalized size = 9.2 \begin{align*} \left [\frac{{\left (c d e^{2} f^{2} + a d e^{2} g^{2} +{\left (c e^{3} f^{2} + a e^{3} g^{2}\right )} x\right )} \sqrt{-e f g + d g^{2}} \log \left (\frac{e g x - e f + 2 \, d g - 2 \, \sqrt{-e f g + d g^{2}} \sqrt{e x + d}}{g x + f}\right ) + 2 \,{\left (c d e^{2} f^{2} g -{\left (3 \, c d^{2} e + a e^{3}\right )} f g^{2} +{\left (2 \, c d^{3} + a d e^{2}\right )} g^{3} +{\left (c e^{3} f^{2} g - 2 \, c d e^{2} f g^{2} + c d^{2} e g^{3}\right )} x\right )} \sqrt{e x + d}}{d e^{4} f^{2} g^{2} - 2 \, d^{2} e^{3} f g^{3} + d^{3} e^{2} g^{4} +{\left (e^{5} f^{2} g^{2} - 2 \, d e^{4} f g^{3} + d^{2} e^{3} g^{4}\right )} x}, \frac{2 \,{\left ({\left (c d e^{2} f^{2} + a d e^{2} g^{2} +{\left (c e^{3} f^{2} + a e^{3} g^{2}\right )} x\right )} \sqrt{e f g - d g^{2}} \arctan \left (\frac{\sqrt{e f g - d g^{2}} \sqrt{e x + d}}{e g x + d g}\right ) +{\left (c d e^{2} f^{2} g -{\left (3 \, c d^{2} e + a e^{3}\right )} f g^{2} +{\left (2 \, c d^{3} + a d e^{2}\right )} g^{3} +{\left (c e^{3} f^{2} g - 2 \, c d e^{2} f g^{2} + c d^{2} e g^{3}\right )} x\right )} \sqrt{e x + d}\right )}}{d e^{4} f^{2} g^{2} - 2 \, d^{2} e^{3} f g^{3} + d^{3} e^{2} g^{4} +{\left (e^{5} f^{2} g^{2} - 2 \, d e^{4} f g^{3} + d^{2} e^{3} g^{4}\right )} x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 26.087, size = 107, normalized size = 0.96 \begin{align*} \frac{2 c \sqrt{d + e x}}{e^{2} g} + \frac{2 \left (a g^{2} + c f^{2}\right ) \operatorname{atan}{\left (\frac{\sqrt{d + e x}}{\sqrt{- \frac{d g - e f}{g}}} \right )}}{g^{2} \sqrt{- \frac{d g - e f}{g}} \left (d g - e f\right )} + \frac{2 \left (a e^{2} + c d^{2}\right )}{e^{2} \sqrt{d + e x} \left (d g - e f\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14253, size = 157, normalized size = 1.4 \begin{align*} \frac{2 \, \sqrt{x e + d} c e^{\left (-2\right )}}{g} + \frac{2 \,{\left (c f^{2} + a g^{2}\right )} \arctan \left (\frac{\sqrt{x e + d} g}{\sqrt{-d g^{2} + f g e}}\right )}{{\left (d g^{2} - f g e\right )} \sqrt{-d g^{2} + f g e}} + \frac{2 \,{\left (c d^{2} + a e^{2}\right )}}{{\left (d g e^{2} - f e^{3}\right )} \sqrt{x e + d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]